﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FlexPlatform.Shared.Validation;

namespace FlexPlatform.BusinessLogic.Validation
{
    public class PropertyValidationCompletedArgs : ValidationCompletedArgs
    {
        #region Private fields & Constructor(s)
        
        private string clsPropertyName;

        /// <summary>
        /// Creates a new instance of <see cref="PropertyValidationCompletedArgs"/>.
        /// </summary>
        /// <param name="propertyName">The name of the property just validated.</param>
        /// <param name="results">The validation results.</param>
        public PropertyValidationCompletedArgs(string propertyName, IEnumerable<IValidationResult> results)
            : base(results)
        {
            this.clsPropertyName = propertyName;
        }

        #endregion

        /// <summary>
        /// Gets the name of the validated property;
        /// </summary>
        public string PropertyName
        {
            get
            {
                return clsPropertyName;
            }
        }

    }
}
